package com.dfbz.bigdata.modules.system.service.impl;



import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dfbz.bigdata.modules.system.doman.DesignerCase;
import com.dfbz.bigdata.modules.system.dto.DesignerCaseDto;
import com.dfbz.bigdata.modules.system.mapper.DesignerCaseMapper;
import com.dfbz.bigdata.modules.system.service.DesignerCaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author CL
* @description 针对表【tb_designer_case】的数据库操作Service实现
* @createDate 2022-09-23 16:24:43
*/
@Service
public class DesignerCaseServiceImpl extends ServiceImpl<DesignerCaseMapper, DesignerCase>
    implements DesignerCaseService {

    @Autowired
    private DesignerCaseMapper designerCaseMapper;

    @Override
    public List<DesignerCaseDto> getCaseList(String caseTitle, int currentPage, int pagesizes) {
        int begin = (currentPage - 1) * pagesizes;
        List<DesignerCaseDto> caseList = designerCaseMapper.getCaseList(caseTitle, begin, pagesizes);

        return caseList;

    }

    @Override
    public Integer getTotal() {
        return designerCaseMapper.getTotal();
    }

//    小程序 列表
    @Override
    public List<DesignerCaseDto> getMiniCaseList(Integer parent, Integer style) {
        return designerCaseMapper.getMiniCaseList(parent,style);
    }

//    小程序byId查
    @Override
    public DesignerCaseDto getCaseListByid(Long caseId) {
        return designerCaseMapper.getCaseListByid(caseId);
    }
}




